#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-03-27 21:12:40
import sys


times = sys.stdin.readline()
turns = sys.stdin.readline()
turn_list = ['N', 'E', 'S', 'W']


sum_num = 0
for i in turns:
    if i == 'L':
        sum_num += -1
    else:
        sum_num += 1

#print sum_num
print turn_list[(sum_num % 4) - 1]

import sys


data = sys.stdin.readline()
begin, end = data.split(' ')
# print(begin, end)
sum_nums = 0


def checkNum(n):
    tmp = 0
    for i in n:
        tmp += int(i)
    if tmp % 3 == 0:
        return 1
    else:
        return 0


tmpstring = ''
for i in range(1, int(end) + 1):
    tmpstring = tmpstring + str(i)
    if i < int(begin):
        continue
    else:
        ret = checkNum(tmpstring)
        if ret == 1:
            sum_nums += 1

print sum_nums